﻿<div class="question-detail-container" ng-controller="QuestionDetailController">
    <h2>Question Details</h2>
    <div class="row">
        <div class="media question-content">
            <div class="media-body">
                <h4 class="media-heading">{{model.title}} - {{model.createdBy}}</h4>
                {{model.content}}
            </div>
            <div class="media question-comment">
                <div class="media-body" ng-repeat="comment in model.comments">
                    <h4 class="media-heading">{{comment.title}} - {{comment.userId}}</h4>
                    {{comment.content}}
                </div>
            </div>
        </div>
    </div>
    <div class="row answer-content-container">
        <div class="well media answer-content" ng-repeat="answer in answers">
            <div class="media-body">
                {{answer.content}}
            </div>
            <div class="media answer-comment">
                <div class="media-body answer-comment-container" ng-repeat="comment in model.answer.comments">
                    <h4 class="media-heading">{{comment.title}} - {{comment.userId}}</h4>
                    <div>
                        {{comment.content}}
                    </div>
                </div>
                <div class="well add-comment" ng-hide="answer.content">
                    <a href="#" editable-textarea="commentmodel.comment" onaftersave="saveComment()">Click here to comment</a>
                </div>
            </div>
        </div>
        
    </div>
    <div class="row">
        <div class="well add-answers">
            <a href="#" editable-textarea="answermodel.answer" onaftersave="saveAnswer()">Click here to answer</a>
        </div>
    </div>
</div>